package com.yy.studymybatisplus.entity;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.yy.studymybatisplus.enums.SexEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
    //mybatis-plus可以自动将数据库中的 is_delete 转换成isDelete


    //添加逻辑删除字段
    @TableLogic
    private Integer isDelete;
    //设置性别为枚举类型
    private SexEnum sex;
}
